Conditions | 1 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import GoogleMap from './blocks/maps/modules/GoogleMap'; |
||
5 | constructor() { |
||
6 | window.GoogleMap = { |
||
7 | readyApi: false, |
||
8 | api: document.querySelector('meta[property="maps:key"]').getAttribute('content'), |
||
9 | instances: [], |
||
10 | init: () => { |
||
11 | [].forEach.call(document.querySelectorAll('*[data-module="google-map"]'), (container, index) => { |
||
|
|||
12 | let instanceId = createRandomId(); |
||
13 | let options = container.getAttribute('data-options'); |
||
14 | |||
15 | if (typeof options == 'undefined' || options == '') { |
||
16 | options = {}; |
||
17 | } else { |
||
18 | options = JSON.parse(options); |
||
19 | } |
||
20 | |||
21 | window.GoogleMap.instances.push(new GoogleMap(container, Object.assign({ |
||
22 | instanceId: instanceId |
||
23 | }, options))); |
||
24 | }); |
||
25 | } |
||
26 | }; |
||
27 | } |
||
28 | |||
48 | }); |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.